Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » Utilities » Downloads
 
Add your own
alternative version
Go to top

FUSE(file system in userspace) for Microsoft-SQL using C#

, 19 Aug 2010
Map your database table as network disk
MSSQLFS.ZIP
MSSQLFS
Application
bin
MSSQLFS_App.suo
Properties
Settings.settings
CodeProject
MSSQLFS.suo
SqlFS
bin
Metadata
Properties
SqlFS.csproj.user
SqlFS.suo
Zalohy
Program.zip
Zdroje
DokanNet+-+2009_01_30+-+With+working+MirrorFS+and+TraceFS.zip
Zdroje
Database-Off.bmp
Database-On.bmp
Icon.bmp
Icon.pdn
Icon1.ico
Server-off.bmp
Server-on.bmp
User.bmp
Z lohy
using System;
using System.IO;
using System.Collections;

namespace Dokan
{
    public class DokanFileInfo
    {
        public Object Context;
        public bool IsDirectory;
        public ulong InfoId;
        public uint ProcessId;
        public bool DeleteOnClose;
        public bool PagingIo;
        public bool SynchronousIo;
        public bool Nocache;
        public bool WriteToEndOfFile;
        public readonly ulong DokanContext; // for internal use

        public DokanFileInfo(ulong dokanContext)
        {
            Context = null;
            IsDirectory = false;
            DeleteOnClose = false;
            PagingIo = false;
            SynchronousIo = false;
            Nocache = false;
            WriteToEndOfFile = false;
            InfoId = 0;
            DokanContext = dokanContext;
        }
    }


    public class FileInformation
    {
        public FileAttributes Attributes;
        public DateTime CreationTime;
        public DateTime LastAccessTime;
        public DateTime LastWriteTime;
        public long Length;
        public string FileName;
        /*
        public FileInformation()
        {
            Attributes = FileAttributes.Normal;
            Length = 0;
        }
         */
    }

    public interface DokanOperations
    {
        int CreateFile(
                string filename,
                FileAccess access,
                FileShare share,
                FileMode mode,
                FileOptions options,
                DokanFileInfo info);

        int OpenDirectory(
                string filename,
                DokanFileInfo info);

        int CreateDirectory(
                string filename,
                DokanFileInfo info);

        int Cleanup(
                string filename,
                DokanFileInfo info);

        int CloseFile(
                string filename,
                DokanFileInfo info);

        int ReadFile(
                string filename,
                byte[] buffer,
                ref uint readBytes,
                long offset,
                DokanFileInfo info);

        int WriteFile(
                string filename,
                byte[] buffer,
                ref uint writtenBytes,
                long offset,
                DokanFileInfo info);

        int FlushFileBuffers(
                string filename,
                DokanFileInfo info);

        int GetFileInformation(
                string filename,
                ref FileInformation fileinfo,
                DokanFileInfo info);

        int FindFiles(
                string filename,
                ArrayList files,
                DokanFileInfo info);

        int SetFileAttributes(
                string filename,
                FileAttributes attr,
                DokanFileInfo info);

        int SetFileTime(
                string filename,
                DateTime ctime,
                DateTime atime,
                DateTime mtime,
                DokanFileInfo info);

        int DeleteFile(
                string filename,
                DokanFileInfo info);

        int DeleteDirectory(
                string filename,
                DokanFileInfo info);

        int MoveFile(
                string filename,
                string newname,
                bool replace,
                DokanFileInfo info);

        int SetEndOfFile(
                string filename,
                long length,
                DokanFileInfo info);

        int SetAllocationSize(
                string filename,
                long length,
                DokanFileInfo info);

        int LockFile(
                string filename,
                long offset,
                long length,
                DokanFileInfo info);

        int UnlockFile(
                string filename,
                long offset,
                long length,
                DokanFileInfo info);

        int GetDiskFreeSpace(
                ref ulong freeBytesAvailable,
                ref ulong totalBytes,
                ref ulong totalFreeBytes,
                DokanFileInfo info);

        int Unmount(
                DokanFileInfo info);

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

martin.nedopil

Czech Republic Czech Republic
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 19 Aug 2010
Article Copyright 2010 by martin.nedopil
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid