projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add scaled icon data
[goodguy/history.git]
/
cinelerra-5.0
/
guicast
/
filesystem.C
diff --git
a/cinelerra-5.0/guicast/filesystem.C
b/cinelerra-5.0/guicast/filesystem.C
index 1b4a8b1ac5661bdf808526ab1269aa9cee1475b7..0f03530e8711517b591f2181dfec53e036d8ead7 100644
(file)
--- a/
cinelerra-5.0/guicast/filesystem.C
+++ b/
cinelerra-5.0/guicast/filesystem.C
@@
-31,6
+31,8
@@
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
+#include <utime.h>
+
#include "filesystem.h"
#include "filesystem.h"
@@
-792,7
+794,7
@@
int FileSystem::join_names(char *out, const char *dir_in, const char *name_in)
return 0;
}
return 0;
}
-int64_t FileSystem::get_date(char *filename)
+int64_t FileSystem::get_date(c
onst c
har *filename)
{
struct stat file_status;
bzero(&file_status, sizeof(struct stat));
{
struct stat file_status;
bzero(&file_status, sizeof(struct stat));
@@
-800,6
+802,14
@@
int64_t FileSystem::get_date(char *filename)
return !result ? file_status.st_mtime : -1;
}
return !result ? file_status.st_mtime : -1;
}
+void FileSystem::set_date(const char *path, int64_t value)
+{
+ struct utimbuf new_time;
+ new_time.actime = value;
+ new_time.modtime = value;
+ utime(path, &new_time);
+}
+
int64_t FileSystem::get_size(char *filename)
{
struct stat file_status;
int64_t FileSystem::get_size(char *filename)
{
struct stat file_status;
@@
-857,6
+867,7
@@
FileItem* FileSystem::get_entry(int entry)
return dir_list.values[entry];
}
return dir_list.values[entry];
}
+
// collapse ".", "..", "//" eg. x/./..//y = y
char *FileSystem::basepath(const char *path)
{
// collapse ".", "..", "//" eg. x/./..//y = y
char *FileSystem::basepath(const char *path)
{