Commit Graph

19 Commits

Author SHA1 Message Date
Steve Francia a9385f2db9 Removing extra normalize call
(since open already normalizes)
2015-12-08 16:24:09 -05:00
Steve Francia 54ad8f690d MkdirAll should respect permissions (MemMapFS) 2015-12-08 16:24:09 -05:00
Steve Francia 3a224e9827 Normalize Paths so "/boo/" and "/boo" are the same 2015-12-03 09:45:14 -05:00
Steve Francia 75dc847d59 Start MemMapFS with a root directory. 2015-12-02 16:27:14 -05:00
Martin Bertschler 5a59c3f940 properly rename files by changing file.name and newly registering with parent 2015-11-22 14:34:57 +01:00
spf13 3f6f746a75 Treat existing files and directories differently in MemMapFS. 2015-11-16 21:26:16 -05:00
Martin Bertschler 0a58b8245b Fix a bug that happens when the parent is the "." file. 2015-11-07 01:33:53 +01:00
Alex Tomlins 582dcbe54c Support O_TRUNC flag to MemMapFs.OpenFile
To truncate an existing file when opening.
2015-11-05 06:59:56 -05:00
Alex Tomlins 7441922445 Support O_APPEND flag in *MemMapFs.Openfile
To allow opening an existing file in append mode.
2015-11-05 06:59:56 -05:00
Alex Tomlins 47e9336de6 Handle O_CREATE flag to *MemMapFs.OpenFile.
To allow MemMapFs to be used in place of OsFs in tests where this flag
is used to create the file if it doesn't already exist..
2015-11-05 06:59:56 -05:00
Martin Bertschler 10150bfa64 fix Readdir behaviour for n > 0, fix RemoveAll 2015-11-04 20:33:40 +01:00
Martin Bertschler 3de0cfae06 make Readdir and Readdirnames work
+ fix registerWithParent function
+ fix unRegisterWithParent and use it in Remove and RemoveAll
+ fix findParent function
+ add lock free versions of Mkdir and Open for the use during register and unregistering with parent, so that these changes happen atomical
2015-10-17 12:58:11 +02:00
Alex Tomlins 6ced24dbe1 Make MemMapFs.Remove() error for non-existent file
So that it's consistent with the os package.
2015-09-08 08:16:57 -04:00
Alex Tomlins a269144fd6 Fix MemMapFs.Remove() to really delete the file.
It was attempting to delete a file with a hardcoded path of "name" as
opposed to the path in the `name` variable.

Fixing this exposed a deadlock because the function was attempting to
acquire an exclusive lock when it already had a read lock.
2015-09-08 08:16:57 -04:00
Anton Tiurin 5849bf9936 [MemMap] Fix a data race
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-09-08 08:15:56 -04:00
spf13 f20e72f15f adding List function to memmapfs 2014-12-12 13:32:57 -05:00
spf13 f5d2472495 Adding proper open support for memfile 2014-10-31 23:38:54 -04:00
spf13 0c3b992fe6 Adding chmod and chtimes support. 2014-10-31 23:36:45 -04:00
spf13 0bc61700a3 afero is born 2014-10-28 10:29:28 -04:00