Exemple #1
0
        private static bool IsWritableImpl(RubyContext /*!*/ context, string /*!*/ path)
        {
            FileSystemInfo fsi;

            if (RubyStatOps.TryCreate(context, path, out fsi))
            {
                return(RubyStatOps.IsWritable(fsi));
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
        public static bool IsZeroLength(RubyClass /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ path)
        {
            string strPath = path.ConvertToString();

            // NUL/nul is a special-cased filename on Windows
            if (strPath.ToLower() == "nul")
            {
                return(RubyStatOps.IsZeroLength(RubyStatOps.Create(self.Context, strPath)));
            }

            if (DirectoryExists(self.Context, strPath) || !FileExists(self.Context, strPath))
            {
                return(false);
            }

            return(RubyStatOps.IsZeroLength(RubyStatOps.Create(self.Context, strPath)));
        }
Exemple #3
0
 public static DateTime ModifiedTime(RubyContext /*!*/ context, RubyFile /*!*/ self)
 {
     return(RubyStatOps.ModifiedTime(RubyStatOps.Create(context, self.Path)));
 }
Exemple #4
0
 public static FileSystemInfo Stat(RubyContext /*!*/ context, RubyFile /*!*/ self)
 {
     return(RubyStatOps.Create(context, self.Path));
 }
Exemple #5
0
 public static DateTime AccessTime(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.AccessTime(RubyStatOps.Create(self.Context, path)));
 }
Exemple #6
0
 public static object NullableSize(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.NullableSize(RubyStatOps.Create(self.Context, path)));
 }
Exemple #7
0
 public static bool IsSymLink(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.IsSymLink(RubyStatOps.Create(self.Context, path)));
 }
Exemple #8
0
 public static FileSystemInfo Stat(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.Create(self.Context, path));
 }
Exemple #9
0
 public static int Size(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.Size(RubyStatOps.Create(self.Context, path)));
 }
Exemple #10
0
 public static bool IsBlockDevice(RubyClass /*!*/ self, object /*!*/ path)
 {
     return(RubyStatOps.IsBlockDevice(RubyStatOps.Create(self.Context, path)));
 }
Exemple #11
0
 public static MutableString FileType(RubyClass /*!*/ self, object path)
 {
     return(RubyStatOps.FileType(RubyStatOps.Create(self.Context, path)));
 }
Exemple #12
0
 public static RubyTime AccessTime(RubyContext /*!*/ context, RubyFile /*!*/ self)
 {
     return(RubyStatOps.AccessTime(RubyStatOps.Create(context, self.Path)));
 }
Exemple #13
0
 public static RubyTime ModifiedTime(RubyClass /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ path)
 {
     return(RubyStatOps.ModifiedTime(RubyStatOps.Create(self.Context, path)));
 }
Exemple #14
0
 public static FileSystemInfo /*!*/ Stat(RubyClass /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ path)
 {
     return(RubyStatOps.Create(self.Context, path));
 }
Exemple #15
0
 public static MutableString FileType(RubyClass /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ path)
 {
     return(RubyStatOps.FileType(RubyStatOps.Create(self.Context, path)));
 }
Exemple #16
0
 public static RubyTime AccessTime(RubyClass /*!*/ self, [DefaultProtocol] MutableString /*!*/ path)
 {
     return(RubyStatOps.AccessTime(RubyStatOps.Create(self.Context, path)));
 }