EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Can File be Created ?

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#7714
Posted: 09/25/2008 08:28:26
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Hi

Is it possible to disallow creating folder/file on some folders (Special folders) like the event CanFileBeDeleted
Code
        private void CbFsCanFileBeDeleted(object sender, CbFsFileInfo FileInfo, ref Boolean CanBeDeleted)
        {
            string[] buffer = FileInfo.FileName.Split(new char[] { '\\' },StringSplitOptions.RemoveEmptyEntries );
            if (buffer.Length.Equals(1))//Root level
            {
                if (FileInfo.Attributes == System.IO.FileAttributes.Directory )//Group
                    CanBeDeleted = false;
            }
            else
                CanBeDeleted = true;
        }


I am looking for some thing like CbFsCanFileBeCreated ...

thanks
#7717
Posted: 09/25/2008 08:49:50
by Eugene Mayevski (EldoS Corp.)

Such event doesn't happen in the OS so the only way to prevent creation of some folder is throw an exception returning some meaningful error code from OnFileCreate.


Sincerely yours
Eugene Mayevski
#7718
Posted: 09/25/2008 08:57:24
by Khayralla AL-Athari (Standard support level)
Joined: 09/23/2008
Posts: 75

Thanks Eugene

Done.

Khayralla

Reply

Statistics

Topic viewed 2022 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!