set the modification and access time of a file
@throws FileNotFoundException if the path is not a file
961864
public void setTimes(String src, long mtime, long atime) throws IOException {
    checkOpen();
    clearFileStatusCache();

    try {
      namenode.setTimes(src, mtime, atime);
    } catch(RemoteException re) {
      throw re.unwrapRemoteException(AccessControlException.class,
                                     FileNotFoundException.class);
    }
  }
1326843
def reset_time(path='.', amt=None):
    '''
    
    '''
    if not amt:
        amt = int(time.time())
    for fname in os.listdir(path):
        fname = os.path.join(path, fname)
        if os.path.isdir(fname):
            reset_time(fname, amt=amt)
        os.utime(fname, (amt, amt,))
658089
public function setFileFoot(): void
    {
        // check local service file
        $this->fileFoot = $this->prepareFilePath('foot', false);
        if (!file_exists($this->fileFoot)) {
            // look up for default file
            $this->fileFoot = $this->prepareDefaultFilePath('foot');
        }
    }
1202991
public function setPath( $path )
	{
#		if( $path && !file_exists( $path ) )
#			throw new RuntimeException( 'Invalid path' );
		$path	= str_replace( DIRECTORY_SEPARATOR, "/", $path );
		$path	= preg_replace( "@(.+)/$@", "\\1", $path )."/";
		$this->path	= $path;
	}
51709
public void setTimes (Path f, long t, long a) throws IOException {
    try (Closeable context = new TimerContextWithLog(this.setTimesTimer.time(), "setTimes", f, t, a)) {
      super.setTimes(f, t, a);
    }
  }
773950
public function find($path)
    {
        $file = $this->findFileAt($path);

        if (is_null($file)) {
            throw new FileNotFoundException('File "'.$path.'" was not found.');
        }

        return new File($this->api, $this->containerName(), $file);
    }
349808
public void setPath(String path)
    {
        if (getState() != __MSG_EDITABLE) throw new IllegalStateException("Not EDITABLE");
        if (_uri == null)
            _uri = new URI(path);
        else
            _uri.setURI(path);
    }
80853
def modification_time(path)
      is_uri = URI.parse(path)
      if !is_uri.host.nil?
        return web_modification_time is_uri
      end
      File.new(path).mtime
    end
1200245
def change_time(filename, newtime):
    """"""
    with open(filename, "w") as faketimetxt_handle:
        faketimetxt_handle.write("@" + newtime.strftime("%Y-%m-%d %H:%M:%S"))
1311426
public function getLastModified(): \DateTime
    {
        \clearstatcache();
        if (false === $mtime = \filemtime($this->filename)) {
            throw new TimeCanNotBeReadException('Last modification time can not be read.');
        }
        return (new \DateTime())->setTimestamp($mtime);
    }
44403
private function setFilesMtime()
  {
    $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->myWorkDirName,
                                                                          FilesystemIterator::UNIX_PATHS));
    foreach ($files as $full_path => $file)
    {
      if ($file->isFile())
      {
        $key = substr($full_path, strlen($this->myWorkDirName.'/'));
        if (isset($this->myLastCommitTimes[$key]))
        {
          $this->logVerbose("Set mtime of %s to %s", $full_path, date('Y-m-d H:i:s', $this->myLastCommitTimes[$key]));
          $success = touch($full_path, $this->myLastCommitTimes[$key]);
          if (!$success)
          {
            $this->logError("Unable to set mtime of file %s", $full_path);
          }

          $this->myCount++;
        }
      }
    }
  }
1321630
private function updateFile()
    {
        if (is_null($this->file_path)) {
            throw new StorageException('Invalid file path');
        }

        file_put_contents(
            $this->file_path,
            serialize(
                [
                    'tokens' => $this->tokens,
                    'states' => $this->states
                ]
            )
        );
    }
117862
def modification_time(self):
    """"""
    timestamp = self._fsntfs_file_entry.get_modification_time_as_integer()
    return dfdatetime_filetime.Filetime(timestamp=timestamp)
1041055
@Override
  public FileInfo generateClientFileInfo(String path) {
    FileInfo ret = new FileInfo();
    ret.setFileId(getId());
    ret.setName(getName());
    ret.setPath(path);
    ret.setBlockSizeBytes(0);
    ret.setCreationTimeMs(getCreationTimeMs());
    ret.setCompleted(true);
    ret.setFolder(isDirectory());
    ret.setPinned(isPinned());
    ret.setCacheable(false);
    ret.setPersisted(isPersisted());
    ret.setLastModificationTimeMs(getLastModificationTimeMs());
    ret.setTtl(mTtl);
    ret.setTtlAction(mTtlAction);
    ret.setOwner(getOwner());
    ret.setGroup(getGroup());
    ret.setMode(getMode());
    ret.setPersistenceState(getPersistenceState().toString());
    ret.setMountPoint(isMountPoint());
    ret.setUfsFingerprint(Constants.INVALID_UFS_FINGERPRINT);
    ret.setAcl(mAcl);
    ret.setDefaultAcl(mDefaultAcl);
    return ret;
  }
926928
public function setReadOnly($f)
    {
        if ($f instanceof PhingFile) {
            $strPath = (string) $f->getPath();
            $perms = (int) (@fileperms($strPath) & 0444);

            FileSystem::getFileSystem()->chmod($strPath, $perms);
        } else {
            throw new Exception("IllegalArgumentType: Argument is not File");
        }
    }
163828
void setTimes(String src, INode inode, long mtime, long atime, boolean force)
                                                        throws IOException {
    if (unprotectedSetTimes(src, inode, mtime, atime, force)) {
      fsImage.getEditLog().logTimes(src, mtime, atime);
    }
  }
411399
def set_modification_time(self, modification_time=True):
        
        if (isinstance(modification_time, basestring) and
                modification_time.lower() == 'write') or\
                modification_time is True:
            self.modification_time = True
        else:
            self.modification_time = check_time(modification_time)