case class LocalFileDescriptor(initialPath: String) extends FileDescriptor with Logging with Product with Serializable
- Alphabetic
- By Inheritance
- LocalFileDescriptor
- Serializable
- Serializable
- Product
- Equals
- Logging
- FileDescriptor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LocalFileDescriptor(initialPath: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
/(name: String): LocalFileDescriptor
Adds a new child node to the filesystem path.
Adds a new child node to the filesystem path.
- name
the node name.
- returns
the new file descriptor with the updated path
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cd(pathString: String): LocalFileDescriptor
Changes the path of the file descriptor using unix's cd syntax related to the current directory.
Changes the path of the file descriptor using unix's cd syntax related to the current directory. Ex: Go back to directories: ../.. Go to child directories: foo/bar Go to sibling directory: ../foo Absolute path changes are not supported.
- pathString
the cd command
- returns
the new file descriptor with the updated path
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
child(name: String): LocalFileDescriptor
Adds a new child node to the filesystem path.
Adds a new child node to the filesystem path.
- name
the node name.
- returns
the new file descriptor with the updated path
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
children(names: String*): LocalFileDescriptor
Adds multiple new child nodes to the filesystem path.
Adds multiple new child nodes to the filesystem path.
- names
the node names to add.
- returns
the new file descriptor with the updated path
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
delete(): Boolean
Deletes the file associated with the file descriptor
Deletes the file associated with the file descriptor
- returns
trueif the delete was successful,falseotherwise.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
deleteDir(): Boolean
Deletes the directory associated with the file descriptor by recursively deleting all the directories and files inside it.
Deletes the directory associated with the file descriptor by recursively deleting all the directories and files inside it. Symbolic links are not followed and are just deleted as "regular" files.
- returns
trueif the delete was successful,falseotherwise.
-
def
download(localTarget: LocalFileDescriptor, safeDownloading: Boolean): Boolean
Downloads the file to the given local destination.
Downloads the file to the given local destination. Both the source and the destination must point to a file.
- localTarget
the local destination to which this file should be downloaded. The path must be absolute path to the final file.
- safeDownloading
downloads the file to filename + ".tmp" and renames it to the original name if the download was successful.
- returns
trueif the download was successful,falseotherwise.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
- Definition Classes
- LocalFileDescriptor → Equals → AnyRef → Any
-
def
exists: Boolean
Returns true if the file pointed by the file descriptor exists
Returns true if the file pointed by the file descriptor exists
- returns
true if the file pointed by the file descriptor exists
- Definition Classes
- LocalFileDescriptor → FileDescriptor
- lazy val file: File
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val initialPath: String
-
def
isDirectory: Boolean
Returns true if the fd points to a directory
Returns true if the fd points to a directory
- returns
true if the fd points to a directory
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lines(): Iterator[String]
Returns an iterator with the lines of this file.
Returns an iterator with the lines of this file.
- returns
an iterator with the lines of this file.
- Definition Classes
- FileDescriptor
-
def
list: Iterator[LocalFileDescriptor]
Lists the files in the current file descriptor directory
Lists the files in the current file descriptor directory
- returns
a iterator of file descriptors
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
listAllFilesWithPrefix(prefix: String): Iterator[LocalFileDescriptor]
Lists all files down the file hierarchy tree that whose relative path match the given prefix
Lists all files down the file hierarchy tree that whose relative path match the given prefix
- prefix
the prefix to match given each file relative path to the current directory
- returns
a iterator of file descriptors
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
lazy val
log: Logger
The
Loggerobject.The
Loggerobject. This logger will have the same name as the concrete class into which this trait is mixed-in.- Definition Classes
- Logging
-
def
mkdirs(): Boolean
Creates intermediary directories
Creates intermediary directories
- returns
true if the creation of successful, false otherwise.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
lazy val
name: String
The name of the file associated with the file descriptor.
The name of the file associated with the file descriptor.
- returns
the file name.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parent(n: Int): LocalFileDescriptor
Returns the file descriptor
nnode up in the filesystem path.Returns the file descriptor
nnode up in the filesystem path.- n
the number of parent nodes to go back.
- returns
the file descriptor
nnode up in the filesystem path.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
lazy val
path: String
Returns the unique identifier of this file in its location.
Returns the unique identifier of this file in its location.
- returns
the unique identifier of this file in its location.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
readString: String
Reads the file pointed by the file descriptor and returns it in string format
Reads the file pointed by the file descriptor and returns it in string format
- returns
the contents of the file in string format
-
def
rename(to: LocalFileDescriptor): Option[LocalFileDescriptor]
Renames the file pointed by the file descriptor
Renames the file pointed by the file descriptor
- to
the file descriptor to be renamed to
- returns
a Some of the renamed file descriptor if successful, otherwise None.
-
def
sibling(f: (String) ⇒ String): LocalFileDescriptor
Returns a new file descriptor pointing to a sibling of the current file descriptor
Returns a new file descriptor pointing to a sibling of the current file descriptor
- f
a function that returns a new name from the current name of the file descriptor
- returns
a new file descriptor pointing to a sibling of the current file descriptor
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
sibling(name: String): FileDescriptor
Returns a new file descriptor pointing to a sibling of the current file descriptor
Returns a new file descriptor pointing to a sibling of the current file descriptor
- name
the file name of the new file descriptor
- returns
a new file descriptor pointing to a sibling of the current file descriptor
- Definition Classes
- FileDescriptor
-
def
size: Long
The size of the file associated with the file descriptor.
The size of the file associated with the file descriptor.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
stream(offset: Long = 0L): FileInputStream
Returns an input stream for the contents of this file.
Returns an input stream for the contents of this file.
- offset
bytes to skip before reading the file.
- returns
an input stream for the contents of this file.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- LocalFileDescriptor → AnyRef → Any
-
def
upload(inputStream: InputStream, length: Option[Long]): Boolean
Uploads an input stream to this file's location.
Uploads an input stream to this file's location. The target must point to a file.
- inputStream
the input stream that should be uploaded.
- length
the input stream length (leaving this as
Nonecan have performance implications)- returns
trueif the upload was successful,falseotherwise.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
def
upload(localTarget: LocalFileDescriptor): Boolean
Uploads a local file to this file's location.
Uploads a local file to this file's location. Both the source and the target must point to a file.
- localTarget
the local file that should be uploaded. The path must be absolute path to the final file.
- returns
trueif the upload was successful,falseotherwise.
- Definition Classes
- LocalFileDescriptor → FileDescriptor
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
write(byteArray: Array[Byte]): Unit
Writes the given byteArray to file pointed by the file descriptor
Writes the given byteArray to file pointed by the file descriptor
- byteArray
the byte array to write to the file
-
def
write(str: String): Unit
Writes the given string
strto the file pointed by the file descriptorWrites the given string
strto the file pointed by the file descriptor- str
the string to write to the file