J.File
- Source
- __.scala
Member
J.File.Store is an opaque value, backed by java.nio.file.FileStore
- Source
- Store.scala
J.File.Store is an opaque value, backed by java.nio.file.FileStore
- Source
- Store.scala
J.File.System is an opaque value, backed by java.nio.file.FileSystem
- Source
- System.scala
J.File.System is an opaque value, backed by java.nio.file.FileSystem
- Source
- System.scala
Def
File extension
File extension
Returns the part of file name after last period
If no period in file name, empty String is returned
val p = J.Path("C:", "Temp", "Test.txt")
val f: J.File = p.fileMake
f.path tp // Prints: C:\Temp\Test.txt
f.name tp // Prints: Test.txt
f.extension tp // Prints: txt
- Source
- __.scala
Read as String
Read as String
Reads this
file as String
Full code = openInput.asText.readAllAndClose
- Source
- __.scala
Creates temporary file
Creates temporary file
Creates new temporary file with this
file as base
if App.^.TempPath? is available, this will be the directory, otherwise this
file directory will be used
Temporary file name will be `this.name' plus '.temp' or '.temp1' or '.temp2' or '.temp3' or etc. if exists
val p = J.Path("C:", "Temp", "Test.txt")
val f: J.File = p.fileMake
f.temp tp // Prints: C:\Temp\Test.txt.temp
f.temp tp // Prints: C:\Temp\Test.txt.temp1
f.temp tp // Prints: C:\Temp\Test.txt.temp2
- Source
- __.scala
Write String
Write String
Writes String to this
file, overwriting prior data
Full code =
if (exists) delete;
openOutput.asText.writeAllAndClose(s)
- Source
- __.scala
Inherited
Type to Info
Type to Info
Override this method to provide type standard Info implementation
- Inherited from
- Type
- Source
- Type.scala
Void check
Void check
Override this method to define which instances of this type are void
By default this method always returns false
If type supports void instances, then following inmpelentation should be added in most cases:
implicit inline def xxRequest(inline v: \/) : <type> = <return void>
- Inherited from
- Type
- Source
- Type.scala