Gets the distinguished folder for this folder class
427672
def get_distinguished(cls, account):
        """"""
        if not cls.DISTINGUISHED_FOLDER_ID:
            raise ValueError('Class %s must have a DISTINGUISHED_FOLDER_ID value' % cls)
        folders = list(FolderCollection(
            account=account,
            folders=[cls(account=account, name=cls.DISTINGUISHED_FOLDER_ID, is_distinguished=True)]
        ).get_folders()
        )
        if not folders:
            raise ErrorFolderNotFound('Could not find distinguished folder %s' % cls.DISTINGUISHED_FOLDER_ID)
        if len(folders) != 1:
            raise ValueError('Expected result length 1, but got %s' % folders)
        folder = folders[0]
        if isinstance(folder, Exception):
            raise folder
        if folder.__class__ != cls:
            raise ValueError("Expected 'folder' %r to be a %s instance" % (folder, cls))
        return folder
150251
public function getCacheDir()
	{
		if ($this->cacheDir === null) {
			$this->setCacheDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
		}

		return $this->cacheDir;
	}
896158
def get(self):
        
        for path, dirs, files in os.walk(self.directory):
            folders = path[self.start:].split(os.sep)
            if self.branches:
                if self._filter(folders, 'folders'):
                    files = dict.fromkeys(files)
                    parent = reduce(dict.get, folders[:-1], self.tree_dict)
                    parent[folders[-1]] = files
            else:
                files = dict.fromkeys(files)
                parent = reduce(dict.get, folders[:-1], self.tree_dict)
                parent[folders[-1]] = files
        return self.tree_dict
425444
public function getAssetsFolderDirName()
    {
        if ($this->owner->getField('AssetsFolderID') != 0) {
            $dirObj = $this->owner->AssetsFolder();
            $dirName = str_replace('assets/', '', $dirObj->Filename);

            return $dirName;
        }
    }
931884
private void mkdir(IStructuredSelection selection) {
    List<DFSFolder> folders = filterSelection(DFSFolder.class, selection);
    if (folders.size() >= 1) {
      DFSFolder folder = folders.get(0);
      InputDialog dialog =
          new InputDialog(Display.getCurrent().getActiveShell(),
              "Create subfolder", "Enter the name of the subfolder", "",
              null);
      if (dialog.open() == InputDialog.OK)
        folder.mkdir(dialog.getValue());
    }
  }
1039490
def get_static_directory():
    
    directory = templates_dir = os.path.join(os.path.dirname(__file__), 'static')
    return directory
270743
def get_parent_folder_name(file_path):
    
    return os.path.split(os.path.split(os.path.abspath(file_path))[0])[-1]
722766
String getUIDFolderName() {
        if (uidFolderName == null) {
            String relPath = getAbsolutePath().replace(REPO_ABSOLUTE_PATH, "");
            relPath = relPath.substring(relPath.indexOf(SystemUtils.FILE_SEPARATOR) + 1);
            String[] parts = relPath.split("[\\\\/]");
            uidFolderName = StringUtils.isEmpty(parts[0]) ? "" : parts[0];
        }
        return uidFolderName;
    }
2884
public String getAsText() {
		Object theValue = getValue();
		if (theValue == null) {
			return null;
		}
		else {
			return ((DistinguishedName) theValue).toString();
		}
	}
749593
def get_special_folder(self, name):
        

        name = name if \
            isinstance(name, OneDriveWellKnowFolderNames) \
            else OneDriveWellKnowFolderNames(name.lower())
        name = name.value

        if self.object_id:
            # reference the current drive_id
            url = self.build_url(
                self._endpoints.get('get_special').format(id=self.object_id,
                                                          name=name))
        else:
            # we don't know the drive_id so go to the default
            url = self.build_url(
                self._endpoints.get('get_special_default').format(name=name))

        response = self.con.get(url)
        if not response:
            return None

        data = response.json()

        # Everything received from cloud must be passed as self._cloud_data_key
        return self._classifier(data)(parent=self,
                                      **{self._cloud_data_key: data})
1368989
def get_category(filename):
    
    return '/'.join(os.path.dirname(filename).split(os.sep))
531186
private byte[] getClassDigest(File directory, String name) {
    String baseName = getBaseFileName(name);
    File digestFile = new File(directory, baseName + DIGEST_EXTENSION);
    return getFileContents(digestFile);
  }
1298510
public static function GetFirstExisting( string $folder ) : string
   {

      // Remove directory separator from $folder end
      $folder = \rtrim( $folder, '\\/' );

      if ( \Niirrty\strContains( $folder, '/' ) && \Niirrty\strContains( $folder, '\\' ) )
      {
         // Uses mixed directory separators, normalize it
         if ( \DIRECTORY_SEPARATOR == '\\' )
         {
            $folder = \str_replace( '/', '\\', $folder );
         }
         else
         {
            $folder = \str_replace( '\\', '/', $folder );
         }
      }

      // Get the current sub folder level
      $level =
         \count(
            \explode(
               \DIRECTORY_SEPARATOR,
               \ltrim( $folder, '\\/' )
            )
         );

      for ( $i = 0; $i < $level && ! \is_dir( $folder ); ++$i )
      {
          $f = \dirname( $folder );
          if ( empty( $f ) || $f == $folder )
          {
             return '/';
          }
          $folder = $f;
      }

      \clearstatcache();

      return $folder;

   }
962434
function() {
                var absPath = _path.resolve(_folderPath);
                if (!_fs.existsSync(absPath)) {
                    return '[DOES NOT EXIST]';
                } else {
                    var stats = _fs.lstatSync(absPath);
                    if (stats.isDirectory()) {
                        return '[DIR]';
                    } else if (stats.isSymbolicLink()) {
                        return '[LINK]';
                    } else {
                        return '[FILE]';
                    }
                }
            }
112064
private function _sortDirection()
    {
        $collection = ResourceTable::collection();
        $sort = $collection->getSort();

        return $sort['dir'] ? $sort['dir'] : ResourceTable::DEFAULT_SORT_DIR;
    }
121685
public function getRootDir()
    {
        static $dir;
        if (empty($dir)) {
            $rc = new \ReflectionClass(get_class($this));
            $dir = dirname(dirname($rc->getFileName()));
        }
        return $dir;
    }
784727
def _GetDirectory(self):
    
    if self.entry_type != definitions.FILE_ENTRY_TYPE_DIRECTORY:
      return None
    return VShadowDirectory(self._file_system, self.path_spec)