@@ -36,22 +36,32 @@ def exists(self):
3636
3737 @property
3838 def is_file (self ):
39+ """Test if the path is a regular file"""
3940 return self .run_test ("test -f %s" , self .path ).rc == 0
4041
4142 @property
4243 def is_directory (self ):
44+ """Test if the path exists and a directory"""
4345 return self .run_test ("test -d %s" , self .path ).rc == 0
4446
47+ @property
48+ def is_executable (self ):
49+ """Test if the path exists and permission to execute is granted"""
50+ return self .run_test ("test -x %s" , self .path ).rc == 0
51+
4552 @property
4653 def is_pipe (self ):
54+ """Test if the path exists and is a pipe"""
4755 return self .run_test ("test -p %s" , self .path ).rc == 0
4856
4957 @property
5058 def is_socket (self ):
59+ """Test if the path exists and is a socket"""
5160 return self .run_test ("test -S %s" , self .path ).rc == 0
5261
5362 @property
5463 def is_symlink (self ):
64+ """Test if the path exists and is a symbolic link"""
5565 return self .run_test ("test -L %s" , self .path ).rc == 0
5666
5767 @property
@@ -86,10 +96,12 @@ def uid(self):
8696
8797 @property
8898 def group (self ):
99+ """Return file group name as string"""
89100 raise NotImplementedError
90101
91102 @property
92103 def gid (self ):
104+ """Return file group id as integer"""
93105 raise NotImplementedError
94106
95107 @property
@@ -124,10 +136,12 @@ def contains(self, pattern):
124136
125137 @property
126138 def md5sum (self ):
139+ """Compute the MD5 message digest of the file content"""
127140 raise NotImplementedError
128141
129142 @property
130143 def sha256sum (self ):
144+ """Compute the SHA256 message digest of the file content"""
131145 raise NotImplementedError
132146
133147 def _get_content (self , decode ):
0 commit comments