isRessourceLocked-character-method: Is File System Ressource Locked

Description Usage Arguments Value Author(s) References See Also Examples

Description

See generic: isRessourceLocked

Usage

1
2
## S4 method for signature 'character'
isRessourceLocked(path, ...)

Arguments

path

character. File path.

...

Further arguments passed to subsequent functions/methods. getLockFileName.

Value

logical. TRUE: locked; FALSE: not locked.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

https://github.com/Rappster/filesystr

See Also

isRessourceLocked

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Not run: 

## Create example content  
path <- file.path(tempdir(), "test/registry.rdata")
dir.create(dirname(path), showWarnings = FALSE)
file.create(path)

## Open directory in file system browser //
openRessource(path = dirname(path))

## File //
isRessourceLocked(path = path)
lockRessource(path = path)
## Note additional '*FILE_LOCK' file in directory 
isRessourceLocked(path = path)
unlockRessource(path = path)
## Note '*FILE_LOCK' file in directory has been removed again

## Directory //
isRessourceLocked(path = dirname(path))
lockRessource(path = dirname(path))
## Note additional '*DIR_LOCK' file in directory 
isRessourceLocked(path = dirname(path))
unlockRessource(path = dirname(path))
## Note '*DIR_LOCK' file in directory has been removed again

## Non-existing ressources //
try(isRessourceLocked(path = "abcd"))


## End(Not run)

rappster/filesystr documentation built on May 26, 2019, 11:17 p.m.