예제 #1
0
파일: Cache.cs 프로젝트: ericx/dokan-sshfs
        public DokanError CreateDirectory(string filename, DokanFileInfo info)
        {
            CacheEntry entry = cache_.Lookup(filename);

            if (entry.Parrent != null)
            {
                entry.Parrent.RemoveAllCache();
            }
            return(ope_.CreateDirectory(filename, info));
        }
예제 #2
0
        ////

        public int CreateDirectoryProxy(string rawFileName,
                                        DokanFileInfo rawFileInfo)
        {
            try
            {
                return((int)_operations.CreateDirectory(rawFileName, rawFileInfo));
            }
            catch
            {
#if DEBUG
                throw;
#endif
                return(ERROR_INVALID_FUNCTION);
            }
        }
예제 #3
0
        public int CreateDirectoryProxy(IntPtr rawFileName, ref DOKAN_FILE_INFO rawFileInfo)
        {
            try
            {
                string file = GetFileName(rawFileName);

                DokanFileInfo info = ConvertFileInfo(ref rawFileInfo);
                int           ret  = operations.CreateDirectory(file, info);
                rawFileInfo.Context     = info.refFileHandleContext;
                rawFileInfo.IsDirectory = Convert.ToByte(info.IsDirectory);
                return(ret);
            }
            catch (Exception ex)
            {
                Log.ErrorException("CreateDirectoryProxy threw: ", ex);
                return(-1);
            }
        }
예제 #4
0
        ////

        public NtStatus CreateDirectoryProxy(string rawFileName,
                                             DokanFileInfo rawFileInfo)
        {
            try
            {
                Trace("\nCreateDirectoryProxy : " + rawFileName);
                Trace("\tContext\t" + ToTrace(rawFileInfo));

                NtStatus result = operations.CreateDirectory(rawFileName, rawFileInfo);

                Trace("CreateDirectoryProxy : " + rawFileName + " Return : " + result);
                return(result);
            }
#pragma warning disable 0168
            catch (Exception ex)
#pragma warning restore 0168
            {
                Trace("CreateDirectoryProxy : " + rawFileName + " Throw : " + ex.Message);
                return(DokanResult.InvalidParameter);
            }
        }