September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,9 @@
|
|||
' There is no built in command in Gambas to 'set' the modification time of a file
|
||||
' A shell call to 'touch' would do it
|
||||
|
||||
Public Sub Main()
|
||||
Dim stInfo As Stat = Stat(User.home &/ "Rosetta.txt")
|
||||
|
||||
Print "Rosetta.txt was last modified " & Format(stInfo.LastModified, "dd/mm/yyy hh:nn:ss")
|
||||
|
||||
End
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
// version 1.0.6
|
||||
|
||||
import java.io.File
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val filePath = "input.txt" // or whatever
|
||||
val file = File(filePath)
|
||||
with (file) {
|
||||
println("%tc".format(lastModified()))
|
||||
// update to current time, say
|
||||
setLastModified(System.currentTimeMillis())
|
||||
println("%tc".format(lastModified()))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
use System.IO.File;
|
||||
|
||||
class Program {
|
||||
function : Main(args : String[]) ~ Nil {
|
||||
File->ModifiedTime("file_mod.obs")->ToString()->PrintLine();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
load "stdlib.ring"
|
||||
see GetFileInfo( "test.ring" )
|
||||
|
||||
func GetFileInfo cFile
|
||||
cOutput = systemcmd("dir /T:W " + cFile )
|
||||
aList = str2list(cOutput)
|
||||
cLine = aList[6]
|
||||
aInfo = split(cLine," ")
|
||||
return aInfo
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
info:=File.info("input.txt");
|
||||
// -->T(size,last status change time,last mod time,isDir,mode), from stat(2)
|
||||
info.println();
|
||||
Time.Date.ctime(info[2]).println();
|
||||
File.setModTime("input.txt",Time.Clock.mktime(2014,2,1,0,0,0));
|
||||
File.info("input.txt")[2] : Time.Date.ctime(_).println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue