Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

files #21

Closed
delchev opened this issue May 14, 2016 · 2 comments
Closed

files #21

delchev opened this issue May 14, 2016 · 2 comments

Comments

@delchev
Copy link
Contributor

delchev commented May 14, 2016

API for 'files' utils

@delchev delchev added the prio2 label May 14, 2016
@delchev delchev changed the title file files May 31, 2016
@delchev
Copy link
Contributor Author

delchev commented May 31, 2016

Usage

/* globals $ */
/* eslint-env node, dirigible */

var files = require('io/files');
var response = require('net/http/response');

var file = files.get("../temp/./..");

response.println("[File Exists?]: " + file.exists());
response.println("[File CanonicalPath]: " + file.getCanonicalPath());
response.println("[File Path]: " + file.getPath());
response.println("[File Name]: " + file.getName());
response.println("[File Parent]: " + file.getParent());
response.println("[File Is Directory?]: " + file.isDirectory());
response.println("[File Is File?]: " + file.isFile());
response.println("[File Is Hidden?]: " + file.isHidden());
response.println("[File Last Modified]: " + file.lastModified());
response.println("[File Length]: " + file.length());

response.flush();
response.close();

@delchev delchev closed this as completed Jun 2, 2016
@delchev delchev reopened this Jun 2, 2016
@ThuF ThuF closed this as completed Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants